package kr.hkit.androidcomplete03.ch25;

import kr.hkit.androidcomplete03.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class NewsController extends Activity {
	 public void onCreate(Bundle savedInstanceState) { 
	        super.onCreate(savedInstanceState); 
	        setContentView(R.layout.newscontroller); 
	    } 
	 
	    public void mOnClick(View v) { 
	        switch (v.getId()) { 
	        case R.id.newsstart: 
	            startService(new Intent(NewsController.this, NewsService.class)); 
	            break; 
	        case R.id.newsstop: 
	            stopService(new Intent(NewsController.this, NewsService.class)); 
	            break; 
	        } 
	    } 
}
